// 控制loading状态的vuex
const loading = {
  state: {
    bookid: '',
    chapterNum: 0,
    chapterIndex: 0,
    bookInfo: {},
    voices: [],
  },

  mutations: {
    updateListen(state, payload = {}) {
      Object.keys(payload).forEach(key => {
        state[key] = payload[key];
      });
    }
  }
};

export default loading;
